package com.example.demo;

import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@ResponseBody
public class Application {
    @RequestMapping("/hi")
    public String sayhi(String name){
        if(!StringUtils.hasLength(name)){
            name="张三";
        }
        return "姓名"+name;
    }
}
